package com.hirsi.module.menu.convert;

import com.hirsi.module.menu.entity.Menu;
import com.hirsi.module.menu.vo.EditMenuVo;
import com.hirsi.module.menu.vo.result.MenuTreeResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface MenuConvert {

    MenuConvert INSTANCE = Mappers.getMapper(MenuConvert.class);

    List<MenuTreeResult> menusToMenuTreeResults(List<Menu> menus);

    EditMenuVo menuToEditMenuVo(Menu menu);

    Menu editMenuVoToMenu(EditMenuVo vo);
}
